package aplicacion.frames;


import java.awt.BorderLayout;

import javax.swing.BorderFactory;
import javax.swing.JFrame;
import javax.swing.JProgressBar;
import javax.swing.border.Border;

import textures.viewer.JPanelViewImage;

public class PantallaInicial extends JFrame{

	private static final long serialVersionUID = 1L;


	public PantallaInicial() {
		super("Cargando...");
		this.getContentPane().setLayout(new BorderLayout());
		//setSize(Consts.DEFAULT_FRAME_HEIGHT, Consts.DEFAULT_FRAME_WIDTH);
		setSize(600, 400);
		setLocationRelativeTo(null);
        this.setResizable(false);
        this.setUndecorated(true);
        this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);

        JPanelViewImage imagePanel = new JPanelViewImage();
        imagePanel.createImage("resources/images/splash.png");
         this.getContentPane().add(imagePanel,BorderLayout.CENTER);
        JProgressBar progressBar = new JProgressBar();
	    progressBar.setString("Cargando");
	   // progressBar.setValue(25);
	   // progressBar.setStringPainted(true);
	    progressBar.setIndeterminate(true);
	    Border border = BorderFactory.createTitledBorder("Cargando...");
	    progressBar.setBorder(border);
        this.getContentPane().add(progressBar,BorderLayout.SOUTH);
	}
	
//	public static void main(String[] args) {
////		JFrame f = new JFrame("JProgressBar Sample");
////	    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
////	    Container content = f.getContentPane();
////	    JProgressBar progressBar = new JProgressBar();
////	    progressBar.setString("Cargando");
////	   // progressBar.setValue(25);
////	   // progressBar.setStringPainted(true);
////	    progressBar.setIndeterminate(true);
////	    Border border = BorderFactory.createTitledBorder("Cargando...");
////	    progressBar.setBorder(border);
////	    content.add(progressBar, BorderLayout.NORTH);
////	    f.setSize(300, 100);
////	    f.setUndecorated(false);
////	    f.setVisible(true);
//		GLApp_swingPantallaInicial app = new GLApp_swingPantallaInicial();
//		app.setVisible(true);
//	}

}
